"""
ltr: left to right
rtl: right to left
ttb: top to bottom
"""

""" 输入字符串列表，按字向从左到右，句向从上到下输出 """
def get_ltrttb(text):
    ret = ''
    for line in text:
        ret = ret + str(line)
    return ret

""" 输入字符串列表，按字向从右到左，句向从上到下输出 """
def get_rtlttb(text):
    ret = ''
    for line in text:
        ret = ret + line[::-1]
    return ret

""" 输入字符串列表，按字向从上到下，句向从左到右输出 """
def get_ttbltr(text):
    ret = ''
    chars = [list(sub) for sub in text]
    rowamt = len(chars) #行数
    colamt = 0 #列数
    for each in chars:
        if colamt < len(each):
            colamt = len(each)
    for col in range(colamt):
        for row in range(rowamt):
            if len(chars[row]) > col:
                ret = ret + chars[row][col]
        col += 1
    return ret

""" 输入字符串列表，按字向从上到下，句向输出从右到左 """
def get_ttbrtl(text):
    ret = ''
    chars = [list(reversed(list(sub))) for sub in text]
    rowamt = len(chars) #行数
    colamt = 0 #列数
    for each in chars:
        if colamt < len(each):
            colamt = len(each)
    for col in range(colamt):
        for row in range(rowamt):
            if len(chars[row]) > col:
                ret = ret + chars[row][col]
        col += 1
    return ret